        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>SimplexCache class / box2d Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d" data-type="SimplexCache">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d.html">box2d</a> &rsaquo; <a href="../box2d/SimplexCache.html">SimplexCache</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>SimplexCache</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class SimplexCache {
 /** length or area */
 num metric;

 int count;

 /** vertices on shape A */
 final List&lt;int&gt; indexA;

 /** vertices on shape B */
 final List&lt;int&gt; indexB;

 /**
  * Constructs a new SimplexCache.
  */
 SimplexCache() :
   metric = 0,
   count = 0,
   indexA = new List&lt;int&gt;(3),
   indexB = new List&lt;int&gt;(3) {
   for (int i = 0; i &lt; 3; ++i) {
     indexA[i] = Settings.MAX_INTEGER;
     indexB[i] = Settings.MAX_INTEGER;
   }
 }

 /**
  * Sets this cache equal to the given cache.
  */
 void setFrom(SimplexCache sc) {
   indexA.setRange(0, indexA.length, sc.indexA);
   indexB.setRange(0, indexB.length, sc.indexB);
   metric = sc.metric;
   count = sc.count;
 }
}
</pre>
</div>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="SimplexCache">
<button class="show-code">Code</button>
new <strong>SimplexCache</strong>() <a class="anchor-link" href="#SimplexCache"
              title="Permalink to SimplexCache.SimplexCache">#</a></h4>
<div class="doc">
<p>Constructs a new SimplexCache.</p>
<pre class="source">
SimplexCache() :
 metric = 0,
 count = 0,
 indexA = new List&lt;int&gt;(3),
 indexB = new List&lt;int&gt;(3) {
 for (int i = 0; i &lt; 3; ++i) {
   indexA[i] = Settings.MAX_INTEGER;
   indexB[i] = Settings.MAX_INTEGER;
 }
}
</pre>
</div>
</div>
</div>
<div>
<h3>Properties</h3>
<div class="field"><h4 id="count">
<button class="show-code">Code</button>
int         <strong>count</strong> <a class="anchor-link"
            href="#count"
            title="Permalink to SimplexCache.count">#</a>
        </h4>
        <div class="doc">
<pre class="source">
count
</pre>
</div>
</div>
<div class="field"><h4 id="indexA">
<button class="show-code">Code</button>
final List&lt;int&gt;         <strong>indexA</strong> <a class="anchor-link"
            href="#indexA"
            title="Permalink to SimplexCache.indexA">#</a>
        </h4>
        <div class="doc">
<pre class="source">
indexA
</pre>
</div>
</div>
<div class="field"><h4 id="indexB">
<button class="show-code">Code</button>
final List&lt;int&gt;         <strong>indexB</strong> <a class="anchor-link"
            href="#indexB"
            title="Permalink to SimplexCache.indexB">#</a>
        </h4>
        <div class="doc">
<pre class="source">
indexB
</pre>
</div>
</div>
<div class="field"><h4 id="metric">
<button class="show-code">Code</button>
num         <strong>metric</strong> <a class="anchor-link"
            href="#metric"
            title="Permalink to SimplexCache.metric">#</a>
        </h4>
        <div class="doc">
<pre class="source">
metric
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="setFrom">
<button class="show-code">Code</button>
void <strong>setFrom</strong>(<a href="../box2d/SimplexCache.html">SimplexCache</a> sc) <a class="anchor-link" href="#setFrom"
              title="Permalink to SimplexCache.setFrom">#</a></h4>
<div class="doc">
<p>Sets this cache equal to the given cache.</p>
<pre class="source">
void setFrom(SimplexCache sc) {
 indexA.setRange(0, indexA.length, sc.indexA);
 indexB.setRange(0, indexB.length, sc.indexB);
 metric = sc.metric;
 count = sc.count;
}
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
